this._workspacesThumbnails.get_preferred_height(width);
thumbnailsHeight = Math.min(
thumbnailsHeight * expandFraction,
- height * WorkspaceThumbnail.MAX_THUMBNAIL_SCALE);
+ height * this._workspacesThumbnails.maxThumbnailScale);
childBox.set_origin(0, startY + searchHeight + spacing);
childBox.set_size(width, thumbnailsHeight);
this._workspacesThumbnails.allocate(childBox);
this.add_actor(this._dropPlaceholder);
this._spliceIndex = -1;
+ this._maxThumbnailScale = MAX_THUMBNAIL_SCALE;
this._targetScale = 0;
this._scale = 0;
this._expandFraction = 1;
() => this._updateIndicator(), this);
}
+ get maxThumbnailScale() {
+ return this._maxThumbnailScale;
+ }
+
setMonitorIndex(monitorIndex) {
this._monitorIndex = monitorIndex;
}
const avail = forWidth - totalSpacing;
let scale = (avail / nWorkspaces) / this._porthole.width;
- scale = Math.min(scale, MAX_THUMBNAIL_SCALE);
+ scale = Math.min(scale, this._maxThumbnailScale);
const height = Math.round(this._porthole.height * scale);
return themeNode.adjust_preferred_height(height, height);
workspaceSpacing += spacing / 2;
const progress = 1 - thumbnail.collapse_fraction;
- const width = (this._porthole.width * MAX_THUMBNAIL_SCALE + workspaceSpacing) * progress;
+ const width = (this._porthole.width * this._maxThumbnailScale + workspaceSpacing) * progress;
return accumulator + width;
}, 0);
const thumbnailHeight = thumbnailFullHeight * this._expandFraction;
const roundedVScale = thumbnailHeight / portholeHeight;
- // We always request size for MAX_THUMBNAIL_SCALE, distribute
+ // We always request size for maxThumbnailScale, distribute
// space evently if we use smaller thumbnails
const extraWidth =
- (MAX_THUMBNAIL_SCALE * portholeWidth - thumbnailWidth) * nWorkspaces;
+ (this._maxThumbnailScale * portholeWidth - thumbnailWidth) * nWorkspaces;
box.x1 += Math.round(extraWidth / 2);
box.x2 -= Math.round(extraWidth / 2);
import * as SwipeTracker from './swipeTracker.js';
import * as Util from '../misc/util.js';
import * as Workspace from './workspace.js';
-import {ThumbnailsBox, MAX_THUMBNAIL_SCALE} from './workspaceThumbnail.js';
+import {ThumbnailsBox} from './workspaceThumbnail.js';
const WORKSPACE_SWITCH_TIME = 250;
const [thumbnailsHeight] = this._thumbnails.get_preferred_height(width);
return Math.min(
thumbnailsHeight * expandFraction,
- height * MAX_THUMBNAIL_SCALE);
+ height * this._thumbnails.maxThumbnailScale);
}
_getWorkspacesBoxForState(state, box, padding, thumbnailsHeight, spacing) {